package com.hucheng.seckill.mapper;

import com.hucheng.seckill.entity.SeckillGoodsDO;
import com.hucheng.seckill.query.SeckillGoodsQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: 凉白开不加冰
 * @Version: 0.0.1V
 * @Date: 2019-06-25
 * @Description: 秒杀商品
 **/
@Mapper
public interface SeckillGoodsMapper {
    List<SeckillGoodsDO> selectByQuery(SeckillGoodsQuery seckillGoodsQuery);

    Integer countByQuery(SeckillGoodsQuery seckillGoodsQuery);

    SeckillGoodsDO getSeckillGoodsByGoodsId(Integer goodsId);

    Integer reduceStock(Integer goodsId);
}
